/*
 * @Author: wangming
 * @Date: 2021-12-24 16:23:21
 * @LastEditors: wangming
 * @LastEditTime: 2021-12-30 15:59:03
 * @FilePath: /hanma-application-designer-fed/src/universalConfig/echarts/index.js
 * @Description: 
 */
import { merge, cloneDeep } from "lodash";
const __highSetUp = {
    events: [],//事件组
    RuleConditions: [],//可视化显示规则
};
const __config = {
    type: 'rowLayout',
    height: 300,
    hide: false,
    moduleId: '', //绑定业务模型id
    modelCode: '', //业务模型code
    dataCustomLoad: false, // 自定义加载选项
    dataCustomLoadFn: "", // 自定义加载函数
}
const modulesFiles = require.context('./modules', true, /index.js/);

const ecarhtsConfig = {}, desgicByForm = {}
modulesFiles.keys().forEach(modulePath => {
    const { config, desgicForm } = modulesFiles(modulePath)
    ecarhtsConfig[config.tagName] = merge({ __highSetUp, __config, redirectName: 'hlEcharts' }, config)
    desgicByForm[config.tagName] = cloneDeep(desgicForm)

}, {});
export { ecarhtsConfig, desgicByForm }